package com.boc.usermodule;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.view.View;
import android.widget.Button;

import com.alibaba.android.arouter.facade.annotation.Route;
import com.alibaba.android.arouter.launcher.ARouter;

import butterknife.BindView;
import demo.bocweb.com.sdk.base.fragment.BaseFragment;
import demo.bocweb.com.sdk.config.ARoutConfig;
import demo.bocweb.com.sdk.util.AppUtils;

/**
 * Created by zhelun on 2018/2/7.
 */
@Route(path = ARoutConfig.userPageFragmentPath)
public class UserPageFragment extends BaseFragment {
    @BindView(R2.id.btn_login_out)
    Button btnLoginOut;
    @BindView(R2.id.btn_address)
    Button btnAddress;

    @Override
    public void initUI(View view, @Nullable Bundle savedInstanceState) {
        btnLoginOut.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                AppUtils.loginOut();
            }
        });
        btnAddress.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ARouter.getInstance().build(ARoutConfig.addressListPath).navigation();
            }
        });
    }

    @Override
    public int getLayoutId() {
        return R.layout.fragment_user_page;
    }


}
